package Wuli_2023;

public class cone extends geometry_3D{
     double r;  //半径
    double h; //高

    cone(double r,double h){
        this.r=r;
        this.h=h;
    }

    @Override
    double getBottomS() {
        return new circle(r).getS();
    }

    @Override
    double getV() {
        return Math.PI*r*r*h/3;
    }
}
